'''
Created on 2011-8-26

@author: Administrator
'''
c2s_begin,\
c2s_ping_request,\
c2s_client_info,\
c2s_task_start_respond,\
c2s_task_finish,\
c2s_terminated_task_respond,\
c2s_runings_tasks,\
c2s_preform_info_request,\
c2s_running_tasks,\
c2s_end = range(10)


class C2SPingRequest():
    id  = c2s_ping_request 

class C2SClientInfo():
    id = c2s_client_info
    system = None
    os = None
    bits = None
    mac_addr = None
    name  = None

class C2STaskFinish():
    def __init__(self):
        self.id  = c2s_task_finish
        self.taskid = None
        self.subid = None
        self.result = None
        self.message = '' 
        self.addtional_mail_receiver = None
        
class C2SStartTaskRespond():
    def __init__(self):
        self.id  = c2s_task_start_respond
        self.taskid = None
        self.subid  = None
        self.result = False
        self.message = ''
        
    
class C2STerminatedTaskRespond():
    def __init__(self):
        self.id  = c2s_terminated_task_respond
        self.taskid = None
        self.subid  = None
        self.result = False
        self.message = ''  
    
class C2SPreformanInfoRequest():
    def __init__(self):
        self.id = c2s_preform_info_request
        self.cpu_percent = None
        self.mem_percent = None
        self.free_disk = None
        
class C2SRuningTask():
    def __init__(self):
        self.id  = c2s_running_tasks
        self.tasks = []